package main

import (
	"goframex/example"
	"goframex/example/grpc/balancer/controller"

	"github.com/gogf/gf/contrib/registry/etcd/v2"
	"github.com/gogf/gf/contrib/rpc/grpcx/v2"
)

// docker run -d --name etcd -p 2379:2379 -e ALLOW_NONE_AUTHENTICATION=yes bitnami/etcd:3.4.24
func main() {
	grpcx.Resolver.Register(etcd.New(example.EtcdHost))

	s := grpcx.Server.New(&grpcx.GrpcServerConfig{
		Name:             "demo",
		Address:          "",
		Logger:           nil,
		LogPath:          "",
		LogStdout:        false,
		ErrorStack:       false,
		ErrorLogEnabled:  false,
		ErrorLogPattern:  "",
		AccessLogEnabled: false,
		AccessLogPattern: "",
		Endpoints:        nil,
		Options:          nil,
	})
	controller.Register(s)
	s.Run()
}
